<?php 

require_once('site.php');

class FuncParam{
    
    public $type;
    
    public function FuncParam(){
        
    }
	
	public static function getAll($pdo){
		
		$params = $pdo->query("SELECT id, func_id, type, necessary, detail FROM phpfuncs_param ORDER BY id ASC")->fetchAll(PDO::FETCH_ASSOC);

		$par = array();
		foreach($params as $param){
			$par[$param["func_id"]][] = $param;
		}
//		echo "<pre>";print_r($par);echo "</pre>";
		
		return $par;
	}
}

?>